function mxLine(bounds, stroke, strokewidth)
{
	this.bounds = bounds;
	this.stroke = stroke || 'black';
	this.strokewidth = strokewidth || '1';
};
mxLine.prototype = new mxShape();
mxLine.prototype.constructor = mxLine;
mxLine.prototype.mixedModeHtml = false;
mxLine.prototype.preferModeHtml = false;
mxLine.prototype.clone = function()
{
	var clone = new mxLine(this.bounds, this.stroke, this.strokewidth);
	clone.isDashed = this.isDashed;
	return clone;
};
mxLine.prototype.createVml = function()
{
	var node = document.createElement('v:group');
	node.setAttribute('coordorigin', '0,0');
	node.style.position = 'absolute';
	node.style.overflow = 'visible';
	this.label = document.createElement('v:rect');
	this.configureVmlShape(this.label);
	this.label.setAttribute('stroked', 'false');
	this.label.setAttribute('filled', 'false');
	node.appendChild(this.label);
	this.innerNode = document.createElement('v:polyline');
	this.configureVmlShape(this.innerNode);
	node.appendChild(this.innerNode);
	return node;
};
mxLine.prototype.redrawVml = function()
{
	var x = Math.floor(this.bounds.x);
	var y = Math.floor(this.bounds.y);
	var w = Math.floor(this.bounds.width);
	var h = Math.floor(this.bounds.height);
	this.updateVmlShape(this.node);
	this.node.setAttribute('coordsize', w + ',' + h);
	this.updateVmlShape(this.label);
	this.label.style.left = '0px';
	this.label.style.top = '0px';
	this.innerNode.setAttribute('strokeweight', this.strokewidth * this.scale);
	var direction = this.style[mxConstants.STYLE_DIRECTION];

	if (direction == mxConstants.DIRECTION_NORTH || direction == mxConstants.DIRECTION_SOUTH)
	{
		this.innerNode.points.value = (w / 2) + ',0 ' + (w / 2) + ',' + (h);
	}
	else
	{
		this.innerNode.points.value = '0,' + (h / 2) + ' ' + (w) + ',' + (h / 2);
	}
};
mxLine.prototype.createSvg = function()
{
	var g = this.createSvgGroup('path');

	var color = this.innerNode.getAttribute('stroke');
	this.pipe = document.createElementNS(mxConstants.NS_SVG, 'path');
	this.pipe.setAttribute('stroke', color);
	this.pipe.setAttribute('visibility', 'hidden');
	this.pipe.setAttribute('pointer-events', 'stroke');
	g.appendChild(this.pipe);
	return g;
};
mxLine.prototype.redrawSvg = function()
{
	var strokeWidth = Math.max(1, this.strokewidth * this.scale);
	this.innerNode.setAttribute('stroke-width', strokeWidth);

	if (this.bounds != null)
	{
		var x = this.bounds.x;
		var y = this.bounds.y;
		var w = this.bounds.width;
		var h = this.bounds.height;
		var d = null;
		var direction = this.style[mxConstants.STYLE_DIRECTION];

		if (direction == mxConstants.DIRECTION_NORTH || direction == mxConstants.DIRECTION_SOUTH)
		{
			d = 'M ' + (x + w / 2) + ' ' + y + ' L ' + (x + w / 2) + ' ' + (y + h);
		}
		else
		{
			d = 'M ' + x + ' ' + (y + h / 2) + ' L ' + (x + w) + ' ' + (y + h / 2);
		}
		this.innerNode.setAttribute('d', d);
		this.pipe.setAttribute('d', d);
		this.pipe.setAttribute('stroke-width', this.strokewidth * this.scale + mxShape.prototype.SVG_STROKE_TOLERANCE);
		this.updateSvgTransform(this.innerNode, false);
		this.updateSvgTransform(this.pipe, false);
	}
};

function mxPolyline(points, stroke, strokewidth)
{
	this.points = points;
	this.stroke = stroke || 'black';
	this.strokewidth = strokewidth || 1;
};
mxPolyline.prototype = new mxShape();
mxPolyline.prototype.constructor = mxPolyline;
mxPolyline.prototype.create = function()
{
	var node = null;

	if (this.dialect == mxConstants.DIALECT_SVG)
	{
		node = this.createSvg();
	}
	else if (this.dialect == mxConstants.DIALECT_STRICTHTML
		|| (this.dialect == mxConstants.DIALECT_PREFERHTML && this.points != null && this.points.length > 0))
	{
		node = document.createElement('DIV');
		this.configureHtmlShape(node);
		node.style.borderStyle = 'none';
		node.style.background = '';
	}
	else
	{
		node = document.createElement('v:polyline');
		this.configureVmlShape(node);
		var strokeNode = document.createElement('v:stroke');

		if (this.opacity != null)
		{
			strokeNode.setAttribute('opacity', this.opacity + '%');
		}
		node.appendChild(strokeNode);
	}
	return node;
};
mxPolyline.prototype.createSvg = function()
{
	var g = this.createSvgGroup('path');

	var color = this.innerNode.getAttribute('stroke');
	this.pipe = document.createElementNS(mxConstants.NS_SVG, 'path');
	this.pipe.setAttribute('stroke', color);
	this.pipe.setAttribute('visibility', 'hidden');
	this.pipe.setAttribute('pointer-events', 'stroke');
	g.appendChild(this.pipe);
	return g;
};
mxPolyline.prototype.redrawSvg = function()
{
	this.updateSvgShape(this.innerNode);
	var d = this.innerNode.getAttribute('d')

	if (d != null)
	{
		this.pipe.setAttribute('d', d);
		var strokeWidth = this.strokewidth * this.scale;

		if (mxConstants.SVG_CRISP_EDGES && strokeWidth == Math.floor(strokeWidth) && !this.isRounded)
		{
			this.innerNode.setAttribute('shape-rendering', 'optimizeSpeed');
		}
		else
		{
			this.innerNode.setAttribute('shape-rendering', 'auto');
		}
		this.pipe.setAttribute('stroke-width', strokeWidth + mxShape.prototype.SVG_STROKE_TOLERANCE);
	}
};